{\rtf1\ansi\ansicpg1252\deff0\deflang2070{\fonttbl{\f0\froman\fcharset0 Times New Roman;}{\f1\fswiss\fcharset0 Arial;}} \viewkind4\uc1\pard\sb100\sa100\f0\fs24 NEW \par 10 REM Test Program Three - Blip A Line \line 11 REM 9210.19 Rev 9304.31 \line 12 REM Activate a line on the parallel port for short time \line 13 REM \line 14 REM Keyboard Output BORIS \line 15 REM "1" Key = Bit 0 = Leg 5 \line 16 REM "2" Key = Bit 1 = Legs 4 & 6 \line 17 REM "3" Key = Bit 2 = Left Side Lift \line 18 REM "4" Key = Bit 3 = not used \line 19 REM "5" Key = Bit 4 = not used \line 20 REM "6" Key = Bit 5 = Right Side Lift \line 21 REM "7" Key = Bit 6 = Legs 1 & 3 \line 22 REM "8" Key = Bit 7 = Leg 2 \line 23 REM \line\line 30 DELAY = 200: REM Delay ON time, Increase for longer \line 40 LPRINT CHR$(0); : REM Clear port \line 50 PRINT "Press 1 thru 8 to activate bits, Q to end" \line\line 100 A$ = INKEY$: REM Get key press \line 110 IF A$ = "1" THEN LPRINT CHR$(1); : GOTO 200: REM bit 0 \line 120 IF A$ = "2" THEN LPRINT CHR$(2); : GOTO 200: REM bit 1 \line 130 IF A$ = "3" THEN LPRINT CHR$(4); : GOTO 200: REM bit 2 \line 140 IF A$ = "4" THEN LPRINT CHR$(8); : GOTO 200: REM bit 3 \line 150 IF A$ = "5" THEN LPRINT CHR$(16); : GOTO 200: REM bit 4 \line 160 IF A$ = "6" THEN LPRINT CHR$(32); : GOTO 200: REM bit 5 \line 170 IF A$ = "7" THEN LPRINT CHR$(64); : GOTO 200: REM bit 6 \line 180 IF A$ = "8" THEN LPRINT CHR$(128); : GOTO 200: REM bit 7 \line 190 IF A$ = "q" OR A$ = "Q" THEN LPRINT CHR$(0); : END \line 195 GOTO 100 \line\line 200 REM Delay loop \line 210 FOR I = 1 TO DELAY \line 220 NEXT I \line 230 LPRINT CHR$(0); : REM After delay, clear output \line 240 GOTO 100 \line\line ***** \line\line NEW\line\line 10 REM Test Program Four - RG 9305.11 \line 11 REM Walking Program for BORIS Connected to PC Parallel Port \line 12 REM Control from numeric keypad: UP arrow = Forward, etc. \line 13 REM \line 14 REM Send bits to the parallel port with LPRINT CHR$(Bits); \line 15 REM \line 16 REM Bits = 1*n + 2*n + 4*n + 8*n + 16*n + 32*n + 64*n + 128*n \line 17 REM \line 18 REM Bits equation sets bits ON if n = 1 or OFF if n = 0 \line 19 REM First position (1*n) is bit 0 \line 20 REM Last position (128*n) is bit 7 \line 21 REM Calculate with each n to 1 or 0 for other output patterns \line 22 REM \line 23 REM Note: Ending semicolon (;) on LPRINT command holds \line 24 REM bit pattern at parallel port until next LPRINT \line 25 REM \par 30 DELAY = 350: REM Increase for slower walk, decrease for faster \par 40 PRINT "Press keypad arrow keys for Fwd, Back, Left, Right" \line 50 PRINT "Press space bar for Stop" \line 60 PRINT "Press Q at any time to Quit" \line\line 100 REM Stop walking \line 110 LPRINT CHR$(0); : GOSUB 1000: REM Clear All Bits \line 120 GOTO 100 \line\line 200 REM Walk Forward \line 210 LPRINT CHR$(65); : GOSUB 1000: REM Bit 6, 0 ON \line 220 LPRINT CHR$(4); : GOSUB 1000: REM Bit 2 ON \line 230 LPRINT CHR$(130); : GOSUB 1000: REM Bit 7, 1 ON \line 240 LPRINT CHR$(32); : GOSUB 1000: REM Bit 5 ON \line 250 GOTO 200 300 REM Walk Reverse \line 310 LPRINT CHR$(65); : GOSUB 1000: REM Bit 6, 0 ON \line 320 LPRINT CHR$(32); : GOSUB 1000: REM Bit 5 ON \line 330 LPRINT CHR$(130); : GOSUB 1000: REM Bit 7, 1 ON \line 340 LPRINT CHR$(4); : GOSUB 1000: REM Bit 2 ON \line 350 GOTO 300 \line\line 400 REM Rotate Left 410 LPRINT CHR$(66); : GOSUB 1000: REM Bit 6, 1 ON \line 420 LPRINT CHR$(32); : GOSUB 1000: REM Bit 5 ON \line 430 LPRINT CHR$(129); : GOSUB 1000: REM Bit 7, 0 ON \line 440 LPRINT CHR$(4); : GOSUB 1000: REM Bit 2 ON \line 450 GOTO 400 \par 500 REM Rotate Right \line 510 LPRINT CHR$(66); : GOSUB 1000: REM Bit 6, 1 ON \line 520 LPRINT CHR$(4); : GOSUB 1000: REM Bit 2 ON \line 530 LPRINT CHR$(129); : GOSUB 1000: REM Bit 7, 0 ON \line 540 LPRINT CHR$(32); : GOSUB 1000: REM Bit 5 ON \line 550 GOTO 500 \par 1000 REM Check Key Press and Do Delay Loop \line 1010 A$ = INKEY$ \line 1020 IF A$ = " " THEN PRINT "Stop": LPRINT CHR$(0); : GOTO 100 \line 1030 IF A$ = CHR$(0) + "H" THEN PRINT "Forward": LPRINT CHR$(0); : GOTO 200 \line 1050 IF A$ = CHR$(0) + "P" THEN PRINT "Reverse": LPRINT CHR$(0); : GOTO 300 \line 1060 IF A$ = CHR$(0) + "K" THEN PRINT "Left" : LPRINT CHR$(0); : GOTO 400 \line 1070 IF A$ = CHR$(0) + "M" THEN PRINT "Right" : LPRINT CHR$(0); : GOTO 500 \line 1080 IF A$ = "Q" OR A$ = "q" THEN LPRINT CHR$(0); : END \line\line 1100 FOR I = 1 TO DELAY \line 1110 NEXT I \line 1120 RETURN \line 1900 END \line\line RUN\par \pard\f1\fs20\par }